// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_c.p_b;

import com.nnee.p_c.cls_f;
import com.nnee.p_c.cls_q;
import com.nnee.p_fk.p_a.cls_b;
import java.io.UnsupportedEncodingException;
import java.util.*;
import org.apache.http.HttpEntity;

// Referenced classes of package com.nnee.c.b:
//            c, d

public class cls_a
{

    public cls_a()
    {
    }

    public static cls_c a(cls_b b1, String s, Hashtable hashtable, cls_d d1)
    {
        return a(b1, s, hashtable, null, d1);
    }

    public static cls_c a(cls_b b1, String s, Hashtable hashtable, HttpEntity httpentity, cls_d d1)
    {
        if(b1 == null)
            b1 = cls_b.aGET;
        cls_c c1 = new cls_c(s, b1, d1);
        if(hashtable != null)
        {
            java.util.Map.Entry entry;
            for(Iterator iterator = hashtable.entrySet().iterator(); iterator.hasNext(); c1.a((String)entry.getKey(), (String)entry.getValue()))
                entry = (java.util.Map.Entry)iterator.next();

        }
        c1.a(httpentity);
        return c1;
    }

    public static String a(String s)
    {
        String s1;
        if(s == null)
            s1 = "";
        else
            s1 = com.nnee.p_c.cls_q.b(s, "utf-8");
        return s1;
    }

    protected static void a(Hashtable hashtable, String s, String s1)
    {
        hashtable.put(s, s1);
    }

    public static String b(String s)
    {
        String s1;
        s1 = com.nnee.p_c.cls_f.a(s, "utf-8");
        return s1;
    }

    public static byte[] c(String s)
    {
    	byte abyte0[] = null;
        if(r == null) {
        	abyte0 = s.getBytes();
        }else {
        	byte abyte1[]=null;
			try {
				abyte1 = s.getBytes(r);
			} catch (UnsupportedEncodingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
            abyte0= abyte1;
        }
        return abyte0;
        
    }

    protected static String d(String s)
    {
        int i1 = s.indexOf(":");
        String s1;
        String s2;
        String s3;
        String s4;
        String s5;
        int k1 = 0;
        int j1;
        String s6;
        if(i1 > 0)
        {
            s3 = s.substring(0, i1);
              k1 = s.indexOf("//");
           
            if(k1 > 0)
            {
                int l1 = k1 + "//".length();
                int i2 = s.indexOf("/", l1);
                if(i2 > 0)
                {
                    s2 = s.substring(l1, i2);
                    int j2 = s.indexOf("?", i2);
                    
                    if(j2 > 0)
                        s1 = s.substring(i2, j2);
                    else
                        s1 = s.substring(i2);
                } else
                {
                    s2 = s.substring(l1);
                    s1 = null;
                }
            } else
            {
                s1 = null;
                s2 = null;
            }
        } else
        {
            s1 = null;
            s2 = null;
            s3 = null;
        }
        if(s3 == null || s2 == null){
        	s4 = null;
        } else {
        	j1 = s2.indexOf(":");
            if(j1 <= 0) {s5 = s2;} else {
            	s6 = s2.substring(j1 + 1);
                if((!s3.equals("http") || !s6.equals("80")) && (!s3.equals("https") || !s6.equals("443"))) {
                	s5 = s2;
                } else {
                	 s5 = s2.substring(0, j1);
                }
            }
            if(s1 == null || s1.length() == 0)
                s1 = "/";
            s4 = (new StringBuilder()).append(s3).append("://").append(s5).append(s1).toString();
        }
        
        return s4;
 
    }

    public static final String a = "1.0";
    public static final String b = "utf-8";
    public static final String c = "oauth_consumer_key";
    public static final String d = "oauth_token";
    public static final String e = "oauth_token_secret";
    public static final String f = "oauth_signature_method";
    public static final String g = "oauth_signature";
    public static final String h = "oauth_timestamp";
    public static final String i = "oauth_nonce";
    public static final String j = "oauth_version";
    public static final String k = "oauth_callback";
    public static final String l = "oauth_callback_confirmed";
    public static final String m = "oauth_verifier";
    public static final String n = "Authorization";
    public static final String o = "HMAC-SHA1";
    public static final String p = "OAuth";
    private static final String q = "application/x-www-form-urlencoded";
    private static String r = "utf-8";

}
